package by.bsu.touragency.db.beans;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Hotel {

	private int id;
	private String name;
	private Star star;
	private String about;
	private City city;
	private Eat eat;
	private People people;

	public Hotel() {
		super();
	}

	public Hotel(String name, Star star, String about, City city, Eat eat,
			People people) {
		super();
		this.name = name;
		this.star = star;
		this.about = about;
		this.city = city;
		this.eat = eat;
		this.people = people;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Star getStar() {
		return star;
	}

	public void setStar(Star star) {
		this.star = star;
	}

	public String getAbout() {
		return about;
	}

	public void setAbout(String about) {
		this.about = about;
	}

	public City getCity() {
		return city;
	}

	public void setCity(City city) {
		this.city = city;
	}

	public Eat getEat() {
		return eat;
	}

	public void setEat(Eat eat) {
		this.eat = eat;
	}

	public People getPeople() {
		return people;
	}

	public void setPeople(People people) {
		this.people = people;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isValidHotelName(String name) {
		if (name != "" & name != null && name.length() < 100) {
			Pattern p = Pattern.compile("(([A-Z])*([a-z])+)+");
			Matcher m = p.matcher(name);
			return m.matches();
		} else
			return false;
	}

}
